package com.constant;
		import java.io.*;
		import java.util.Properties;
		import org.apache.hadoop.conf.Configuration;
		
		public final class Constant {
			private Constant() {}
			private static Properties  settings;	
			static {
				settings=new Properties();
				InputStream in = Constant.class.getClassLoader().getResourceAsStream("config.properties");
				try {
					settings.load(in);
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			
			//日志文件路径
			public final static String LOG_PATH=settings.getProperty("LOG_PATH");
			
			//HDFS路径
			public final static String HDFS_PATH=settings.getProperty("HDFS_PATH");
			
			//Linux系统用户
			public final static String HDFS_USER=settings.getProperty("HDFS_USER");
			
			public static final Configuration CONF;
			static {
				CONF=new Configuration();	
				CONF.set("fs.hdfs.impl.disable.cache", "true");
		    	
				CONF.set("dfs.nameservices","nameservice1");
				CONF.set("dfs.ha.namenodes.nameservice1","nn1,nn2");
				CONF.set("dfs.namenode.rpc-address.nameservice1.nn1","master:9000");
				CONF.set("dfs.namenode.rpc-address.nameservice1.nn2","slave1:9000");
				CONF.set("dfs.client.failover.proxy.provider.nameservice1","org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider");
				
			}
	}